<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
	String basePath = request.getScheme() + "://" + request.getServerName()
			+ ":" + request.getServerPort() + request.getContextPath();
%>
<jsp:include page="/WEB-INF/page/auth/_header.jsp"></jsp:include>
<body>
	<jsp:include page="/WEB-INF/page/auth/header.jsp"></jsp:include>
	<div id="middle">
		<jsp:include page="/WEB-INF/page/auth/menu.jsp"></jsp:include>
		<div id="right">
			<div id="kccs_course_signedtb">
		        <form id="kccs_course_signedForm" class="m10">
		           	<span>${term.termName}</span>
		            <select class="form-control1" name="grade" id="grade" onchange="searchClazz('kccs_course_signed',this.value)"></select>
		            <select class="form-control1" name="clazz" id="clazz"></select>
		            <select class="form-control1" name="courseId" id="courseId" style="width: 150px;"></select>
		                             学生姓名：
		            <input class="form-control1" type="text" name="studentName" id="studentName" style="width: 120px;">
					<input type="hidden" id="schoolId" name="schoolId" value=""/>
		            <a class="easyui-linkbutton l-btn l-btn-small" data-options="iconCls:'icon-search'" onclick="searchForm('kccs_course_signed')">查询</a>
		            <a class="easyui-linkbutton l-btn l-btn-small" data-options="iconCls:'icon-clear'" onclick="resetForm('kccs_course_signed')">重置</a>
		        </form>
		    </div>
		    <table id="kccs_course_signeddg">
		        <thead>
		            <tr>
		                <th data-options="field:'id',checkbox:true"></th>
		                <th data-options="field:'gradeName',title:'年级'"></th>
		                <th data-options="field:'clazz',title:'班号'"></th>
		                <th data-options="field:'studentNum',title:'学号'"></th>
		                <th data-options="field:'studentName',title:'学生姓名'"></th>
		                <th data-options="field:'studentIdNoType',title:'证件类型'"></th>
		                <th data-options="field:'studentIdNo',title:'证件号'"></th>
		                <th data-options="field:'studentSex',title:'性别'"></th>
		                <th data-options="field:'courseName',title:'课程名称'"></th>
		                <th data-options="field:'classTeacher',title:'上课老师'"></th>
		                <th data-options="field:'classDate',title:'上课时间'"></th>
		                <th data-options="field:'classAddr',title:'上课地点'"></th>
		            </tr>
		        </thead>
		    </table>
		</div>
	</div>
	<jsp:include page="/WEB-INF/page/auth/_footer.jsp"/>
	<script type="text/javascript">
		var url = basePath + "/sys/kccsCourse/signed";
		var schoolId = $("#userSchoolId").val();
		$(function(){
			initSchoolIdValue();
			initDatagridAdmin('kccs_course_signed',url,0,1,0,0,1);
	        initGrade("kccs_course_signed");
            initSubject("kccs_course_signed");
            courseList("kccs_course_signed");
		});
		function courseList(cf) {
			$.ajax({
				url: url + "/courseList",
				data: {schoolId:schoolId},
				type: 'GET'
			}).done(function(data) {
				var html = "<option value=''>请选择</option>";
				for(var i in data) {
					html += "<option value='"+data[i].id+"'>"+data[i].courseName+"</option>"
				}
				$("#" + cf + "Form #courseId").append(html);
			}).fail(function() {
				$('#msg').html('error,发生错误请及时联系管理员!');
			});
		}
    </script>
</body>
</html>